package com.wanghengzhi.kata;

/**
 *
 * @author wanghengzhi
 * @since 2021/11/4 22:28
 */
public class AgedBrieAbstractGoods extends AbstractGoods {
    public AgedBrieAbstractGoods(double quality, int sellIn) {
        super("Aged Brie", quality, sellIn);
    }

    @Override
    public void updateByDay() {
        increaseQuality();
        decreaseSellIn();
        if (isExpired()) {
            increaseQuality();
        }
    }
}
